{include file="public/header"}
<ul class="layui-nav">
    <li class="layui-nav-item {$Request.controller == 'index' ? 'layui-this' : ''}}"><a href="{:url('Index/add_module')}">添加后台管理</a></li>
    <li class="layui-nav-item">
        <a href="javascript:;" class="{$Request.action == 'menu_list' ? 'layui-this' : ''}">菜单管理</a>
        <dl class="layui-nav-child">
            {foreach $module_list as $item}
            <dd><a href="{:url('Menu/menu_list', ['mg_module'=>$item])}">{$item}</a></dd>
            {/foreach}
        </dl>
    </li>
    <li class="layui-nav-item">
        <a href="javascript:;" class="{$Request.controller == 'Plugin' ? 'layui-this' : ''}">插件安装</a>
        <dl class="layui-nav-child">
            {foreach $module_list as $key => $item}
            {if condition="$key > 0"}
            <?php break;?>
            {/if}
            <dd><a href="{:url('Plugin/plugin_list', ['mg_module'=>$item])}">{$item}</a></dd>
            {/foreach}
        </dl>
    </li>
     <li class="layui-nav-item">
        <a href="javascript:;" class="{$Request.controller == 'curd' ? 'layui-this' : ''}">代码构建</a>
        <dl class="layui-nav-child">
            {foreach $module_list as $item}
            <dd><a href="{:url('Curd/index', ['mg_module'=>$item])}">{$item}</a></dd>
            {/foreach}
        </dl>
     </li>
    <li class="layui-nav-item">
        <a href="javascript:;" class="$Request.controller == 'Validator' ? 'layui-this' : ''}">验证器构建</a>
        <dl class="layui-nav-child">
            {foreach $module_list as $item}
            <dd><a href="{:url('Validator/index', ['mg_module'=>$item])}">{$item}</a></dd>
            {/foreach}
        </dl>
    </li>
</ul>
{include file="public/footer"}
<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;

        //…
    });
</script>